<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>MedSelfEd Patient Education: PreOp.com Gender</title>
<script type="text/javascript" src="http://o.aolcdn.com/dojo/1.1.1/dojo/dojo.xd.js"></script>
<script type="text/javascript" src="../js/global.js"></script>
<script type="text/javascript" src="../js/common.js"></script>
<script type="text/javascript" src="../js/preop/MM_functions.js"></script>
<script type="text/javascript" src="../js/meta.js"></script>
<script type="text/javascript" src="../js/header.js"></script>
<script type="text/javascript" src="../js/help.js"></script>
<script type="text/javascript" src="../js/footer.js"></script>
<script type="text/javascript" src="../js/chromehead.js"></script>
<script type="text/javascript" src="../js/chromefoot.js"></script>
<link href="../css/preop/keyframe.css" rel="stylesheet" type="text/css">
<link href="../css/preop/fonts.css" rel="stylesheet" type="text/css">
<link href="../css/preop/layout.css" rel="stylesheet" type="text/css">
<script type="text/javascript">


function getBodyJson() {
  console.info("getBodyJson");
  dojo.xhrGet({
    url: "../json/center/body.xml.json",
    load: function(respObj, ioArgs){
	console.info("getBodyJson:load");

	var bodySiteId = respObj.siteId;
	
	updateBodyDiv(respObj.bodyElement, 'head');
	updateBodyDiv(respObj.bodyElement, 'breast');
	updateBodyDiv(respObj.bodyElement, 'abs');
	updateBodyDiv(respObj.bodyElement, 'leg');
	updateBodyGeneralDiv(respObj.genElement, 'general');
	return respObj;
    },
    error: function(response, ioArgs){
	console.info("getBodyJson:error");
	console.error(error);
    return response;
    },
   handleAs: "json"
  });
}

function updateBodyDiv (bodyElementRepObj, name) {

	
	var newHtml = '<table cellpadding="2" cellspacing="0" border="0">';
	
	for(var x = 0; x != bodyElementRepObj.length; x++){
		if((bodyElementRepObj[x].@sexId == "shemale") || (bodyElementRepObj[x].@sexId == sexId)){
			if(bodyElementRepObj[x].@region == name){
				newHtml += '<tr>';
				newHtml += '<td valign="top"><img src="../image/000/dot3.gif" height="12" width="20" border="0" name="prodDot' + x + '"></td>';
				newHtml += '<td valign="top"><a href="' + bodyElementRepObj[x].@prodId + '.html" class="altviolet2" ';
				newHtml += 'onMouseOut="restoreImage(document.images[\'prodDot' + x + '\'])" ';
				newHtml += 'onMouseOver="swapImage(document.images[\'prodDot' + x + '\'],genNavImage[3]);">' + bodyElementRepObj[x].@prodName1;
				newHtml += bodyElementRepObj[x].@prodName2 + '</a></td>'
				newHtml += '</tr>';
			}
		}
	}
	newHtml += '</table>';
	
	dojo.byId(name).innerHTML = newHtml;
	
	
}

		
function updateBodyGeneralDiv (genElementRepObj) {

	var newHtml = '<table cellpadding="2" cellspacing="0" border="0">';
	
	for(var x = 0; x != genElementRepObj.length; x++){
		newHtml += '<tr>';
		newHtml += '<td><img src="../image/000/dot3.gif" align="top" border="0" height="12" width="20" name="genDot' + x + '></td>';
		newHtml += '<td valign="top"><a href="/asp/prodDisplay.asp?prodName=' + genElementRepObj[x].@prodName1;
		newHtml += genElementRepObj[x].@prodName2 + '&prodId=' + genElementRepObj[x].prodId + '" class="altviolet2" ';
		newHtml += 'onMouseOut="restoreImage2(document.images[\'genDot' + x + '\']);restoreImage(document.images[\'logoImage\'])" ';
		newHtml += 'onMouseOver="swapImage2(document.images[\'genDot' + x + '\'],genNavImage[3]) ';
		newHtml += 'swapImage(document.images[\'logoImage\'],genNavImage[' + x + ');">';
		newHtml += '<b>' + genElementRepObj[x].text +'</b></a></td>';
		newHtml += '</tr>';
		
		console.log(genElementRepObj[x].text);
	}
	newHtml += '</table>';
	
	dojo.byId(name).innerHTML = newHtml;
		
}
		

var genNavImage = new Array(); 

function initPageMethods(){
	console.log("initPageMethods");
	getBodyImageObj();
	getNavImageObj();
	getBodyJson();
}

</script>
</head>

<!--  standard head -->
<body>
<center>
<div id="containerDiv" style="width:600px">
<div class="topdiv" id="header"></div>
<div class="lrlines">&nbsp;
<div id="contentDiv">
<!--  standard head -->



<table width="99%" border="0" cellspacing="10" cellpadding="0">
	<tr>
		<td align="center"><font class="smlred2">Please rollover the body.</font><br>
		
		<script type="text/javascript">
		<!--
	
		
		document.write('<img width="147" height="72" src="../image/body/head_' + sex + '.gif" border="0" name="headImg" onMouseOver="swapBodyHead();"><br>');
		
		document.write('<img width="147" height="50" src="../image/body/chest_' + sex + '.gif" border="0" name="chestImg" onMouseOver="swapBodyChest();"><br>');
		
		document.write('<img width="147" height="100" src="../image/body/midbody_' + sex + '.gif" border="0" name="midbodyImg" onMouseOver="swapBodyMid();"><br>');
		
		document.write('<img width="147" height="140" src="../image/body/leg_' + sex + '.gif" border="0" name="legImg" onMouseOver="swapBodyLeg();"><br>');
		
		//-->
		</script>
		
		
		</td>
		<td width="253" valign="top">
		
		<div class="divContBody">
		<div id="welcome" class="bodyDivWelcome">
		
		<script type="text/javascript">
		<!--
	
		document.write('<img src="../image/body/txt_welcome_' + sex + '.gif" border="0" />');
	
		//-->	
		</script>
		
		</div>
		
		<div id="head" class="bodyDivHead">

		</div>
		<div id="breast" class="bodyDivBreast">

		</div>
		<div id="abs" class="bodyDivAbs">

		</div>
		<div id="leg" class="bodyDivLeg">

		</div>
		</div>
		</td>
		<td valign="top" align="center"><img src="../image/000/preop/logo_body.gif" border="0" name="logoImage"><br>
		<br>
		<table border="2" cellspacing="1" width="136" height="29">
			<tr>
				<td align="center" valign="middle"><font class="medred">Click on a procedure.</font></td>
			</tr>
		</table>
		<br>
		<br>
		<p class="smlblue">If you don't see your<br>
		procedure, please view<br>
		one of the General surgeries.</p>
		<div id="general" class="bodyDivGeneral">

		</div>
		</td>
	</tr>
</table>


<!--  standard footer -->
</div>
<br>
</div>
<div class="topdiv" id="footer"></div>
</div>
</center>
<script type="text/javascript" src="../js/tracking.js"></script>
</body>
<!--  standard footer -->

</html>
